package zh.codegym.task.task05.task0526;

/* 
男人和女人
*/

import java.util.Map;

public class Solution {
    public static void main(String[] args) {
        //在此编写你的代码

        Woman woman1 = new Woman("1",1,"1");
        Woman woman2 = new Woman("2",2,"2");

        Man man1 = new Man("3",3,"3");
        Man man2 = new Man("4",4,"4");


        System.out.println(man1);
        System.out.println(man2);
        System.out.println(woman1);
        System.out.println(woman2);
    }

    //在此编写你的代码
    public static class Man{
        private String name;
        private String address;
        private int age;

        @Override
        public String toString() {
            return name + ' ' +
                    " " + age +
                    " " + address;
        }

        public Man(String name) {
            this.name = name;
        }

        public Man() {
        }

        public Man(String name, String address) {
            this.name = name;
            this.address = address;
        }

        public Man(String name,int age, String address) {
            this.name = name;
            this.address = address;
            this.age = age;
        }
    }

    public static class Woman {
        private String name;
        private String address;
        private int age;

        @Override
        public String toString() {
            return name + " " +
                    " " + age +
                    " " + address;
        }

        public Woman(String name, int age, String address) {
            this.name = name;
            this.address = address;
            this.age = age;
        }

        public Woman(String name, String address) {
            this.name = name;
            this.address = address;
        }

        public Woman(String name) {
            this.name = name;
        }

        public Woman() {
        }
    }
}
